package hu.mapro.gwtui.client.model;

import com.google.gwt.cell.client.AbstractSafeHtmlCell;
import com.google.gwt.safehtml.shared.SafeHtml;
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;

public class LabelProviderCell<T> extends AbstractSafeHtmlCell<T> {

	public LabelProviderCell(LabelProvider<? super T> labelProvider, String... consumedEvents) {
		super(new LabelProviderRenderer<T>(labelProvider), consumedEvents);
	}
	public LabelProviderCell(LabelProvider<? super T> labelProvider) {
		super(new LabelProviderRenderer<T>(labelProvider));
	}

	@Override
	protected void render(Context context, SafeHtml data, SafeHtmlBuilder sb) {
		if (data != null) {
			sb.append(data);
		}
	}

}